<?php

class ui_input_text extends ui_input
{
	function __construct($name,$value=null)
	{
		if(is_null($value)) $value = '{'.$name.'}';
		$this->init(
			__FILE__,
			'input',
			array(
				'type'=>'text',
				'name'=>$name,
				'value'=>$value,
				'class'=>'input input_text',
			),
			true
		);
	}
	
	function pre_render($data=null)
	{
		parent::pre_render($data);
		if($this->form)
		{
			if(!$this->form->allow_edit)
			{
				$this->render = false;
				$this->post_outer_html .= $this->get('value');
			}
		}
	}
}

?>